

enum Token_Type {
    EOF_TOKEN = 0, //它规定文件的结束
    NUMERIC_TOKEN, //当前Token是数值类型的
    IDENTIFIER_TOKEN,//当前token是标识符
    PARAN_TOKEN, //当前token是括号
    DEF_TOKEN, //当前token是def声明，之后是函数定义
};
//持有数值
static int Numeric_Val;
static std:string Identifier_string;

static int get_token() {
    static int LastChar = ' ';
    while (isspace(LastChar))
    LastChar=fgetc(file);
    if(isalpha(LastChar)) {
Identifier_string = LastChar; while(isalnum((LastChar = fgetc(file)))) Identifier_string += LastChar;
if(Identifier_string == "def") return DEF_TOKEN;
return IDENTIFIER_TOKEN;
}
  if(isdigit(LastChar)) {
    std::string NumStr;
    do {
NumStr += LastChar;
LastChar = fgetc(file); } while(isdigit(LastChar));
Nu meric_Val = strtod(NumStr.c_str(), 0);
    return NUMERIC_TOKEN;
  }
if(LastChar == '#') {
do LastChar = fgetc(file); while(LastChar != EOF && LastChar != '\n' && LastChar != '\r');
if(LastChar != EOF) return get_token(); }
if(LastChar == EOF) return EOF_TOKEN;
int ThisChar = LastChar; LastChar = fgetc(file); return ThisChar;


}